import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/recommend'
  },
  {
    path:'/recommend',
    component:()=>import('@/views/Recommend'),
    meta:{ title:'' , showNav: true}
  },
  {
    path:'/hot',
    component:()=>import('@/views/Hot'),
    meta:{ title:'' , showNav: true}
  },
  {
    path:'/search',
    component:()=>import('@/views/Search'),
    meta:{ title:'' , showNav: true}
  },
  {
    path:'/like',
    component:()=>import('@/views/Like'),
    meta:{ title:'' , showNav: true}
  },
  {
    path:'/my',
    component:()=>import('@/views/My'),
    meta:{ title:'' , showNav: true}
  },
  {
    path:'/login',
    component:()=>import('@/views/Login'),
    meta:{ title:'' , showNav: true}
  },
  {
    path:'/playlist/:id',
    component:()=>import('@/views/PlayList'),
    meta:{ title:'' , showNav: false}
  },
  {
    path:'/comment/:id',
    component:()=>import('@/views/Comment'),
    meta:{ title:'' , showNav: false}
  },
  {
    path:'/mv/:id',
    component:()=>import('@/views/Mv'),
    meta:{ title:'' , showNav: false}
  },
]

const router = new VueRouter({
  base: process.env.BASE_URL,
  routes
})

export default router
